The present invention relates to encoding a video frame, and more particularly, to a method and an apparatus for performing fixed-size slice encoding with slice boundary prediction.
The conventional video coding standards generally adopt a block based (or coding unit based) coding technique to exploit spatial redundancy. For example, the basic approach is to divide the whole source frame into a plurality of blocks (coding units), perform prediction on each block (coding unit), transform residues of each block (coding unit), and perform quantization and entropy encoding. Besides, a reconstructed frame is generated in a coding loop to provide reference pixel data used for coding following blocks (coding units). For certain video coding standards, in-loop filter(s) may be used for enhancing the image quality of the reconstructed frame.
Separating a video frame into multiple slices is essential in some applications, such as error resilience, network transmission, low-latency codec design, etc. Specifically, the slices may be independently encoded at an encoder side, and thus may be independently decodable at a decoder side. For certain applications such as video conference call (e.g., ViLTE (Video over LTE) and video streaming service (e.g., VOD (Video on Demand) or uni-cast/multi-cast IPTV (Internet Protocol Television)), fixed-size slice encoding is mostly used to make bitstream sizes of slices constrained by a maximum encoded slice size. That is,
                    ∑                  i          ∈          slice                    ⁢              MBSize        i              <          SliceSize      Max        ,where i is the index of each coding unit in a frame, MBSize is the bitstream size of each coding unit, and SliceSizeMax is the maximum bitstream size of a slice. However, when a video encoder encodes a current coding unit, bit-count information of the current coding unit is not available because of the hardware limitation of pipeline architecture employed by the video encoder. Hence, it is possible that the encoded slice size exceeds the maximum encoded slice size after encoding the current coding unit that is the last coding unit of the current slice. If the encoded slice size exceeds the maximum encoded slice size, re-encoding the last coding unit to make the encoded slice size constrained by the maximum encoded slice size is not feasible in the hardware implementation.